package com.oceanread.cn.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.oceanread.cn.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper extends BaseMapper<User>{
    User loginUser(@Param("user") String username);
    User insertUser(@Param("user") String username,@Param("pass") String password);
    List<User> getall();

    List<User> getTablelist(@Param("start") int start, @Param("end") int end);
    List<User> query(@Param("start") int start, @Param("end") int end,
                     @Param("key") String key, @Param("value") String value);
    Integer getnum();
    Integer getnumquery(@Param("key") String key, @Param("value") String value);
    Integer update(@Param("id") int id,
                   @Param("username")String username,
                   @Param("role")  String role
    );
    Integer delete(@Param("id") int id);
}
